package com.bgs.controller;

import com.bgs.pojo.NoticcollectVo;
import com.bgs.pojo.Notice;
import com.bgs.pojo.NoticeVo;
import com.bgs.service.ListService;
import com.bgs.tool.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("l")
@CrossOrigin
public class ListController {
    @Autowired
    private ListService listService;

    @GetMapping("/list/{userid}")
    public R Listfind(@PathVariable("userid") Integer userid){

        return listService.Listfind(userid);
    }
    @GetMapping("/listt/{jourId}")
    public R Listfinds(@PathVariable("jourId") Integer jourId){

        return listService.Listfinds(jourId);
    }

    //企业查询
    @GetMapping("/lists/{eid}")
    public R Liste(@PathVariable Integer eid){
        return listService.Liste(eid);
    }

    //公告查询
    @PostMapping("/listde")
    public R FindList(Integer eid){
        List<NoticeVo> list=listService.FindList(eid);
        return R.ok().data("list",list);
    }
}
